const mongoose = require('mongoose')
const {Schema} = mongoose

// 用户详情表规则
const user = new Schema({
  userName:{
    type: String,
    required: true
  },
  password:{
    type: String,
    required: true
  },
  key:{
    type: String,
    required: true
  },
  token:{
    type: String,
    required: true
  },
  avatar:{
    type: String
  },
  introduction:{
    type: String
  },
  isAdmin:{
    type: Boolean
  },
  superAdmin: {
    type: Boolean
  },
  approved:{
    type: Boolean
  },
  freezed: {
    type: Boolean
  },
  createTime:{
    type: Date,
  }
})

const userTable = mongoose.model('userTable',user)

module.exports = userTable